package com.example.demo.dao;


import java.util.List;

import com.example.demo.entity.UserAndRole;
import com.example.demo.mapper.UserAndRoleMapper;

/**
 * 用户与角色数据层操作类
 * @author Henry.Y
 * @date 2019-05-27
 */
public class UserAndRoleDao extends BaseDao implements UserAndRoleMapper{

    public int createUserAndRole(String sqlId,UserAndRole userAndRole){
    	
    	return operateInsertSql(sqlId,userAndRole);
    }
	
	public int deleteUserAndRole(String sqlId,String id){
		
		return operateDeleteSql(sqlId,id);
	}
	
	public UserAndRole selectOneUserAndRole(String sqlId,UserAndRole userAndRole){
		
		return (UserAndRole)operateSelectOneSql(sqlId,userAndRole);
	}
	
	@SuppressWarnings("unchecked")
	public List<UserAndRole> selectUserAndRole(String sqlId){
		
		return (List<UserAndRole>)operateSelectSql(sqlId);
	}
	
	public int deleteUserAndRoleTable(String sqlId){
		
		return deleteForFullTable(sqlId);
	}
}
